package com.yan.furns.dao.impl;

import com.yan.furns.dao.AdminDAO;
import com.yan.furns.dao.BasicDAO;
import com.yan.furns.entity.Admin;

/**
 * @author Yzb
 * @version 1.0
 */
public class AdminDAOImpl extends BasicDAO<Admin> implements AdminDAO {
	@Override
	public Admin getAdminByUsernameAndPassword(String username, String password) {
		String sql = "select * from admin where username=? and password=md5(?)";
//		System.out.println("yes?");
//		System.out.println(username + " " + password);
//		System.out.println(querySingle(sql, Admin.class, username, password));
		return querySingle(sql, Admin.class, username, password);
	}
}
